<template>
	<view class="notice">
		<!-- <view class="notice-close">
			<u-icon name="close-circle" color="#FFF" size="80" @click="closeNotice"></u-icon>
		</view> -->
		<view class="notice-box">
			<view class="notice-box-tit">
				<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/notice/bg.png" class="bg"></image>
				<view class="notice-box-tit-info">
					<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/notice/start.png" mode="widthFix"></image>
					<text>{{title}}</text>
					<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/notice/start.png" mode="widthFix"></image>
				</view>
			</view>
			<view class="notice-html">
				<scroll-view scroll-y class="notice-html-view">
					<rich-text :nodes="html"></rich-text>
				</scroll-view>
			</view>
			<view class="notice-btn" @click="confirmNotice">知道了</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			html: {
				type: String,
				default: ''
			},
			title: {
				type: String,
				default: '注意事项'
			}
		},
		data() {
			return {
				
			};
		},
		methods: {
			closeNotice(){
				this.$emit('closeNotice')
			},
			confirmNotice(){
				this.$emit('confirmNotice')
			}
		}
	}
</script>

<style lang="scss">
	.notice{
		width: 600rpx;
		.notice-close{
			text-align: right;
			margin-bottom: 30rpx;
		}
		.notice-box{
			border-radius: 10rpx;
			background-color: #FFF;
			padding: 0 30rpx 30rpx;
			.notice-box-tit{
				color: #FFF;
				position: relative;
				text-align: center;
				image.bg{
					display: inline-block;
					width: 320rpx;
					height: 98rpx;
				}
				.notice-box-tit-info{
					position: absolute;
					left: 0;
					right: 0;
					top: 20rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					z-index: 2;
					color: #FFF;
					font-size: 32rpx;
					text{
						margin: 0 15rpx;
					}
					image{
						width: 16rpx;
					}
				}
			}
			.notice-html{
				line-height: 52rpx;
				margin-top: 50rpx;
				color: #757575;
				font-size: 24rpx;
				.notice-html-view{
					max-height: 500rpx;
				}
			}
			.notice-btn{
				height: 80rpx;
				line-height: 80rpx;
				color: #FFF;
				background-color: #141414;
				text-align: center;
				margin-top: 50rpx;
				border-radius: 8rpx;
			}
		}
	}
</style>
